/**
 * File Name : AndroidPixmap.java
 * <p>
 * Author : maidou
 * <p>
 * Create Time : 2012-11-15, 下午11:34:10
 * <p>
 */

package com.ttomato.game.framework.impl;

import android.graphics.Bitmap;

import com.ttomato.game.framework.Graphics.PixmapFormat;
import com.ttomato.game.framework.Pixmap;

/**
 * Add the description for the file here.
 * <p>
 */
public class AndroidPixmap implements Pixmap
{
    Bitmap mBitmap;
    
    PixmapFormat mPixmapFormat;
    
    public AndroidPixmap(Bitmap bitmap, PixmapFormat format)
    {
        mBitmap = bitmap;
        mPixmapFormat = format;
    }
    
    @Override
    public int getWidth()
    {
        return mBitmap.getWidth();
    }
    
    @Override
    public int getHeight()
    {
        return mBitmap.getHeight();
    }
    
    @Override
    public PixmapFormat getFormat()
    {
        return mPixmapFormat;
    }
    
    @Override
    public void dispose()
    {
        mBitmap.recycle();
    }
    
}
